﻿using Kw.Combinatorics;
using System;

namespace Kw.CombinatoricsExamples
{
    class MulticombinationExample03
    {
        static void Main ()
        {
            Multicombination multicombo = new Multicombination (6, 4);

            multicombo.Rank = 99;
            Console.WriteLine (multicombo);

            for (int elementIndex = 0; elementIndex < multicombo.Picks; ++elementIndex)
                Console.WriteLine (multicombo[elementIndex]);

            multicombo.Rank = -1;
            Console.WriteLine ("Maximum rank = " + multicombo.Rank);
        }

        /* Output:

        { 2, 2, 4, 5 }
        2
        2
        4
        5
        Maximum rank = 125

        */
    }
}
